package com.tansun.easycare.modules.sys.service.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jeedev.msdp.base.entity.SysUser;
import com.jeedev.msdp.sys.service.IUserService;
import com.tansun.easycare.modules.sys.service.SysUserService;

@Service
public class SysUserServiceImpl implements SysUserService{
	
	@Autowired
	private  IUserService  userService;
	
	
	
	public  SysUser  findUserByNum(String  userNum) {
		Map<String,Object> map  = new  HashMap<>();
		map.put("userNum", userNum);
		return this.userService.getUserIgnoreTen(map);
	}
	
	public  SysUser  getUserById(String id) {
		Map<String,Object> map  = new  HashMap<>();
		map.put("id", id);
		return this.userService.getUserIgnoreTen(map);
	}
	@Override
	public  SysUser findUserByLoginNum(String  loginNum) {
		Map<String,Object> map  = new  HashMap<>();
		map.put("loginName", loginNum);
		return this.userService.getUserIgnoreTen(map);
	}
	
	public  SysUser findUserByRealNum(String  realNum) {
		Map<String,Object> map  = new  HashMap<>();
		map.put("realname", realNum);
		map.put("del_ind", "0");
		return this.userService.getAccurateUser(map);
	}

	@Override
	public SysUser getCurrUser() {
		// TODO Auto-generated method stub
		return this.userService.getCurrLoginUser();
	}


}
